package com.xixi.Service.Impl;

import com.xixi.Service.DepartmentService;
import com.xixi.dao.DepartmentDao;
import com.xixi.demo.Department;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DepartmentServiceImpl implements DepartmentService {

    @Autowired
    private DepartmentDao departmentDao;

    public List<Department> findAllDepartment() {
        List<Department> list = departmentDao.findAllDepartment();

        return list;
       /* return null;*/
    }

    public Department findById(int id) {
        return departmentDao.findById(id);
       /* return null;*/
    }
}
